﻿
using Newtonsoft.Json;

namespace TImSdk
{
    /// <summary>
    /// 下载元素接口的参数
    /// </summary>
    public class DownloadElemParam
    {
        /// <summary>
        /// 从消息元素里面取出来,元素的下载类型
        /// 是否需要申请下载地址(0:到架平申请，1:到cos申请，2:不需要申请,直接拿url下载)
        /// </summary>
        [JsonProperty("msg_download_elem_param_flag")]
        public int Msg_Download_Elem_Param_Flag { get; set; }
        /// <summary>
        /// 从消息元素里面取出来,元素的类型
        /// </summary>
        [JsonProperty("msg_download_elem_param_type")]
        public TIMDownloadType Msg_Download_Elem_Param_Type { get; set; }
        /// <summary>
        ///  从消息元素里面取出来,元素的ID
        /// </summary>
        [JsonProperty("msg_download_elem_param_id")]
        public string Msg_download_Elem_Param_Id { get; set; }
        /// <summary>
        /// 从消息元素里面取出来,元素的BusinessID
        /// </summary>
        [JsonProperty("msg_download_elem_param_business_id")]
        public int Msg_Download_Elem_Param_Business_Id { get; set; }
        /// <summary>
        /// 从消息元素里面取出来,元素URL
        /// </summary>
        [JsonProperty("msg_download_elem_param_url")]
        public string Msg_Download_Elem_Param_Url { get; set; }

        public DownloadElemParam() { }

        public DownloadElemParam(int paramFlag, TIMDownloadType paramType,
            string id, int businessId, string paramUrl)
        {
            Msg_Download_Elem_Param_Flag = paramFlag;
            Msg_Download_Elem_Param_Type = paramType;
            Msg_download_Elem_Param_Id = id;
            Msg_Download_Elem_Param_Business_Id = businessId;
            Msg_Download_Elem_Param_Url = paramUrl;
        }
    }
}
